﻿@using Jhong.FunMVC.Razor
@using Jhong.FunMVCBlog.Core.Entity;
@{
    var lastpublish = (IList<Articles>)@ViewData["lastpublish"];
}
@{
    var links = (IList<Links>)@ViewData["link"];
}
@{
    var cgs = (IDictionary<Guid,string>)@ViewData["category"];
}
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta charset="utf-8">
    <link rel="icon" href="/favicon.ico" type="image/x-icon" />
    <title>@ViewData["blogName"]</title>
    <!--[if lt IE 9]>
       <script src="/scripts/html5shiv.js"></script>
    <![endif]-->
    <link href="/Asset/Blog/blog.min.css" rel="stylesheet" />
</head>
<body>
    <nav class="navbar navbar-default" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">@ViewData["blogName"]</a>
            </div>
        </div>
    </nav>
    <div class="container" id="main">
        <div class="row">
            <div class="col-lg-9">
                @RazorHTMLHelper.HTML.RenderBody()
            </div>
            <div class="col-lg-3 visible-lg sidebar">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <span class="glyphicon glyphicon-user"></span>
                        <strong>
                            关于博主
                        </strong>
                    </div>
                    <div class="panel-body">
                        <div class="text-center">
                            <img class="img-circle" src="@ViewData["personThumbnail"]" alt="@ViewData["nickName"]" />
                        </div>
                        <h3 class="text-center">
                            <a href="@ViewData["homepage"]">
                                @ViewData["nickName"]
                            </a>
                        </h3>
                        <div>
                            @RazorHTMLHelper.Raw(@ViewData["about"])
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <span class="glyphicon glyphicon-sort-by-order"></span>
                        <strong>
                            最新文章
                        </strong>
                    </div>
                    <div class="list-group">
                        @foreach (var item in lastpublish)
                        {
                            <a href="/Home/Article/@item.ID" class="list-group-item">@item.Title</a>
                        }
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <span class="glyphicon glyphicon-tags"></span>
                        <strong>
                            文章分类
                        </strong>
                    </div>
                    <div class="list-group">
                        @foreach (var item in cgs)
                        {
                            <a href="/Home/Category/@item.Key" class="list-group-item">@item.Value</a>
                        }
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <span class="glyphicon glyphicon-user"></span>
                        <strong>
                            友情链接
                        </strong>
                    </div>
                    <div class="list-group">
                        @foreach (var item in links)
                        {
                            <a href="@item.Link" class="list-group-item" target="_blank">@item.Name</a>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer class="footer">
        <div class="container">
            <p class="text-center">Power by FunMVCBlog © 2015</p>
        </div>
    </footer>
</body>
</html>
